<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CryptoAuthLib: i2c_bitbang_samd21.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CryptoAuthLib
   </div>
   <div id="projectbrief">Microchip CryptoAuthentication Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00539_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">i2c_bitbang_samd21.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="a00539.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#ifndef I2C_BITBANG_SAMD21_H_</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#define I2C_BITBANG_SAMD21_H_</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a00173.html">atca_status.h</a>&quot;</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &lt;delay.h&gt;</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="a00539.html#af89a7a4080a47aa10a5504291db285bf">   35</a></span>&#160;<span class="preprocessor">#define MAX_I2C_BUSES   18       //The MAX_I2C_BUSES is the number of free pins in samd21 xplained pro</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="a01141.html">   38</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;{</div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="a01141.html#a396018ddf66ce0e1263ed2b4729dc9b9">   40</a></span>&#160;    uint8_t <a class="code" href="a00539.html#afd6d53ef6b697533839248b40bc97861">pin_sda</a>[<a class="code" href="a00539.html#af89a7a4080a47aa10a5504291db285bf">MAX_I2C_BUSES</a>];</div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="a01141.html#acddd0c9305a0f679828010052db4f184">   41</a></span>&#160;    uint8_t <a class="code" href="a00539.html#a30ad301ad2a35d50b2e4284a58b82b67">pin_scl</a>[<a class="code" href="a00539.html#af89a7a4080a47aa10a5504291db285bf">MAX_I2C_BUSES</a>];</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;} <a class="code" href="a01141.html">I2CBuses</a>;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="keyword">extern</span> <a class="code" href="a01141.html">I2CBuses</a> <a class="code" href="a00539.html#ad2e9f2387bb528f37bceb48cd88af3d0">i2c_buses_default</a>;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="keyword">extern</span> uint8_t <a class="code" href="a00539.html#afd6d53ef6b697533839248b40bc97861">pin_sda</a>;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="keyword">extern</span> uint8_t <a class="code" href="a00539.html#a30ad301ad2a35d50b2e4284a58b82b67">pin_scl</a>;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="a00539.html#ac7dccc9e88a018aa5e25ae1ffa955e04">   49</a></span>&#160;<span class="preprocessor">#   define I2C_ENABLE()         {  struct port_config pin_conf; \</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="preprocessor">                                   port_get_config_defaults(&amp;pin_conf); \</span></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="preprocessor">                                   pin_conf.direction  = PORT_PIN_DIR_OUTPUT_WTH_READBACK; \</span></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="preprocessor">                                   port_pin_set_config(pin_sda, &amp;pin_conf); \</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="preprocessor">                                   pin_conf.direction  = PORT_PIN_DIR_OUTPUT; \</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="preprocessor">                                   port_pin_set_config(pin_scl, &amp;pin_conf); }</span></div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="a00539.html#a35cdede808cc5e50ec96b86ec6d5186a">   55</a></span>&#160;<span class="preprocessor">#   define I2C_DISABLE()         {  struct port_config pin_conf; \</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="preprocessor">                                    port_get_config_defaults(&amp;pin_conf); \</span></div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="preprocessor">                                    pin_conf.direction  = PORT_PIN_DIR_INPUT; \</span></div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="preprocessor">                                    pin_conf.input_pull = PORT_PIN_PULL_UP; \</span></div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="preprocessor">                                    port_pin_set_config(pin_sda, &amp;pin_conf); \</span></div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="preprocessor">                                    port_pin_set_config(pin_scl, &amp;pin_conf); }</span></div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="a00539.html#a73ff0687b7b8e875a604eb441e30603b">   61</a></span>&#160;<span class="preprocessor">#   define I2C_CLOCK_LOW()       port_pin_set_output_level(pin_scl, false)</span></div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="a00539.html#a8bafe0ef98693ff1f6e1a5239f397397">   62</a></span>&#160;<span class="preprocessor">#   define I2C_CLOCK_HIGH()      port_pin_set_output_level(pin_scl, true)</span></div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="a00539.html#afce97c373c5ec7dff5b99e462bb8443d">   63</a></span>&#160;<span class="preprocessor">#   define I2C_DATA_LOW()        port_pin_set_output_level(pin_sda, false)</span></div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="a00539.html#a97f972cfc30401e08fe25de26fcb3812">   64</a></span>&#160;<span class="preprocessor">#   define I2C_DATA_HIGH()       port_pin_set_output_level(pin_sda, true)</span></div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="a00539.html#a67750a8227bb7dffd95a6bb04821194f">   65</a></span>&#160;<span class="preprocessor">#   define I2C_DATA_IN()         port_pin_get_input_level(pin_sda)</span></div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="a00539.html#a704e88e63280d2b338c6d5aaa287ded6">   66</a></span>&#160;<span class="preprocessor">#   define I2C_SET_OUTPUT()      {  struct port_config pin_conf; \</span></div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="preprocessor">                                    port_get_config_defaults(&amp;pin_conf); \</span></div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="preprocessor">                                    pin_conf.direction  = PORT_PIN_DIR_OUTPUT_WTH_READBACK; \</span></div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="preprocessor">                                    port_pin_set_config(pin_sda, &amp;pin_conf); }</span></div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="a00539.html#a560b261db9a1d59e1cd72a73da03d06c">   70</a></span>&#160;<span class="preprocessor">#   define I2C_SET_OUTPUT_HIGH() { I2C_SET_OUTPUT(); I2C_DATA_HIGH(); }</span></div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="a00539.html#a9b2c622317087560cb142947b325cbe9">   71</a></span>&#160;<span class="preprocessor">#   define I2C_SET_OUTPUT_LOW()  { I2C_SET_OUTPUT(); I2C_DATA_LOW(); }</span></div><div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="a00539.html#a3f1efda7918aca40566d1323f8feb7d9">   72</a></span>&#160;<span class="preprocessor">#   define I2C_SET_INPUT()       {  struct port_config pin_conf; \</span></div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="preprocessor">                                    port_get_config_defaults(&amp;pin_conf); \</span></div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="preprocessor">                                    pin_conf.direction  = PORT_PIN_DIR_INPUT; \</span></div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="preprocessor">                                    port_pin_set_config(pin_sda, &amp;pin_conf); }</span></div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="a00539.html#a07adac5c5eb0d63bed4b79a50bcb676b">   76</a></span>&#160;<span class="preprocessor">#   define DISABLE_INTERRUPT()   cpu_irq_disable()</span></div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="a00539.html#a6b267a18dae3dc4d7a2a0b8fdb38e701">   77</a></span>&#160;<span class="preprocessor">#   define ENABLE_INTERRUPT()    cpu_irq_enable()</span></div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="a00539.html#a5f8ab9b2d5d876f1541fa32b1e22e4a9">   80</a></span>&#160;<span class="preprocessor">#define I2C_CLOCK_DELAY_WRITE_LOW()  delay_us(1)</span></div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="a00539.html#abeb77b3a0a6fe395e8b7ecf498850cd7">   81</a></span>&#160;<span class="preprocessor">#define I2C_CLOCK_DELAY_WRITE_HIGH() delay_us(1)</span></div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="a00539.html#a06202abc9352b61a9b332d28530c1e8a">   82</a></span>&#160;<span class="preprocessor">#define I2C_CLOCK_DELAY_READ_LOW()   delay_us(1)</span></div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="a00539.html#aacc56272d59b9d3ebd0e6837727b81d8">   83</a></span>&#160;<span class="preprocessor">#define I2C_CLOCK_DELAY_READ_HIGH()  delay_us(1)</span></div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="a00539.html#a260f2a8cd964aa89a1d6946b2a99f0a4">   84</a></span>&#160;<span class="preprocessor">#define I2C_CLOCK_DELAY_SEND_ACK()   delay_us(1)</span></div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="preprocessor">#define I2C_HOLD_DELAY()    delay_us(1)</span></div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="a00539.html#a4f8a83ae9459703637408a0a194445ac">   92</a></span>&#160;<span class="preprocessor">#define I2C_ACK_TIMEOUT                 (4)</span></div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00539.html#aecf10ae5c65e5e8d20f29acc2fcd5d7d">i2c_set_pin</a>(uint8_t sda, uint8_t scl);</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00539.html#a43b4ceef3780597f5f667ff9cfd0f191">i2c_discover_buses</a>(<span class="keywordtype">int</span> i2c_bitbang_buses[], <span class="keywordtype">int</span> max_buses);</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00539.html#a5a1923e2271df541e858cb4e05d7b895">i2c_enable</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00539.html#abe70f8fe4c72329b89ec526c749f50d7">i2c_disable</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00539.html#a128fce372792e241c66c533edec30c1b">i2c_send_start</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00539.html#a223e077dcbdfaf7944f76664c81c4c3b">i2c_send_ack</a>(uint8_t ack);</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00539.html#a28d871f938b84b40a153a806c55d6aef">i2c_send_stop</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00539.html#a20d903bd4606203e120babaf3fe4d926">i2c_send_wake_token</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00539.html#a04db7e3e2316cb43e97250a12c4eb81b">i2c_send_byte</a>(uint8_t i2c_byte);</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00539.html#a281f835e0c21015a8ab672b08940b730">i2c_send_bytes</a>(uint8_t count, uint8_t *data);</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;uint8_t <a class="code" href="a00539.html#a2f6cabfafc11c56ea8335f54fac20343">i2c_receive_one_byte</a>(uint8_t ack);</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00539.html#a2a3abf2b54b2161feeaf57fdc834586e">i2c_receive_byte</a>(uint8_t *data);</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00539.html#a690ed5c65fe26bbbdf166bbaaf177fc9">i2c_receive_bytes</a>(uint8_t count, uint8_t *data);</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* I2C_BITBANG_SAMD21_H_ */</span><span class="preprocessor"></span></div><div class="ttc" id="a00539_html_a5a1923e2271df541e858cb4e05d7b895"><div class="ttname"><a href="a00539.html#a5a1923e2271df541e858cb4e05d7b895">i2c_enable</a></div><div class="ttdeci">void i2c_enable(void)</div><div class="ttdoc">Configure GPIO pins for I2C clock and data as output.</div><div class="ttdef"><b>Definition:</b> i2c_bitbang_samd21.c:55</div></div>
<div class="ttc" id="a00539_html_a128fce372792e241c66c533edec30c1b"><div class="ttname"><a href="a00539.html#a128fce372792e241c66c533edec30c1b">i2c_send_start</a></div><div class="ttdeci">void i2c_send_start(void)</div><div class="ttdoc">Send a START condition.</div><div class="ttdef"><b>Definition:</b> i2c_bitbang_samd21.c:68</div></div>
<div class="ttc" id="a00173_html_a22bd6643f31f1d75dc3e7ea939f468cd"><div class="ttname"><a href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a></div><div class="ttdeci">ATCA_STATUS</div><div class="ttdef"><b>Definition:</b> atca_status.h:41</div></div>
<div class="ttc" id="a00539_html_a281f835e0c21015a8ab672b08940b730"><div class="ttname"><a href="a00539.html#a281f835e0c21015a8ab672b08940b730">i2c_send_bytes</a></div><div class="ttdeci">ATCA_STATUS i2c_send_bytes(uint8_t count, uint8_t *data)</div><div class="ttdoc">Send a number of bytes.</div><div class="ttdef"><b>Definition:</b> i2c_bitbang_samd21.c:190</div></div>
<div class="ttc" id="a00539_html_a30ad301ad2a35d50b2e4284a58b82b67"><div class="ttname"><a href="a00539.html#a30ad301ad2a35d50b2e4284a58b82b67">pin_scl</a></div><div class="ttdeci">uint8_t pin_scl</div><div class="ttdef"><b>Definition:</b> i2c_bitbang_samd21.c:40</div></div>
<div class="ttc" id="a00539_html_a43b4ceef3780597f5f667ff9cfd0f191"><div class="ttname"><a href="a00539.html#a43b4ceef3780597f5f667ff9cfd0f191">i2c_discover_buses</a></div><div class="ttdeci">void i2c_discover_buses(int i2c_bitbang_buses[], int max_buses)</div><div class="ttdoc">Assigns the logical bus number for discovering the devices.</div><div class="ttdef"><b>Definition:</b> i2c_bitbang_samd21.c:42</div></div>
<div class="ttc" id="a00539_html_abe70f8fe4c72329b89ec526c749f50d7"><div class="ttname"><a href="a00539.html#abe70f8fe4c72329b89ec526c749f50d7">i2c_disable</a></div><div class="ttdeci">void i2c_disable(void)</div><div class="ttdoc">Configure GPIO pins for I2C clock and data as input.</div><div class="ttdef"><b>Definition:</b> i2c_bitbang_samd21.c:62</div></div>
<div class="ttc" id="a01141_html"><div class="ttname"><a href="a01141.html">I2CBuses</a></div><div class="ttdef"><b>Definition:</b> i2c_bitbang_samd21.h:38</div></div>
<div class="ttc" id="a00539_html_aecf10ae5c65e5e8d20f29acc2fcd5d7d"><div class="ttname"><a href="a00539.html#aecf10ae5c65e5e8d20f29acc2fcd5d7d">i2c_set_pin</a></div><div class="ttdeci">void i2c_set_pin(uint8_t sda, uint8_t scl)</div><div class="ttdoc">Set I2C data and clock pin. Other functions will use these pins.</div><div class="ttdef"><b>Definition:</b> i2c_bitbang_samd21.c:49</div></div>
<div class="ttc" id="a00539_html_a690ed5c65fe26bbbdf166bbaaf177fc9"><div class="ttname"><a href="a00539.html#a690ed5c65fe26bbbdf166bbaaf177fc9">i2c_receive_bytes</a></div><div class="ttdeci">void i2c_receive_bytes(uint8_t count, uint8_t *data)</div><div class="ttdoc">Receive a number of bytes.</div><div class="ttdef"><b>Definition:</b> i2c_bitbang_samd21.c:248</div></div>
<div class="ttc" id="a00539_html_ad2e9f2387bb528f37bceb48cd88af3d0"><div class="ttname"><a href="a00539.html#ad2e9f2387bb528f37bceb48cd88af3d0">i2c_buses_default</a></div><div class="ttdeci">I2CBuses i2c_buses_default</div><div class="ttdef"><b>Definition:</b> i2c_bitbang_samd21.c:34</div></div>
<div class="ttc" id="a00539_html_a04db7e3e2316cb43e97250a12c4eb81b"><div class="ttname"><a href="a00539.html#a04db7e3e2316cb43e97250a12c4eb81b">i2c_send_byte</a></div><div class="ttdeci">ATCA_STATUS i2c_send_byte(uint8_t i2c_byte)</div><div class="ttdoc">Send one byte.</div><div class="ttdef"><b>Definition:</b> i2c_bitbang_samd21.c:120</div></div>
<div class="ttc" id="a00539_html_a2a3abf2b54b2161feeaf57fdc834586e"><div class="ttname"><a href="a00539.html#a2a3abf2b54b2161feeaf57fdc834586e">i2c_receive_byte</a></div><div class="ttdeci">void i2c_receive_byte(uint8_t *data)</div><div class="ttdoc">Receive one byte and send ACK.</div><div class="ttdef"><b>Definition:</b> i2c_bitbang_samd21.c:243</div></div>
<div class="ttc" id="a00539_html_a2f6cabfafc11c56ea8335f54fac20343"><div class="ttname"><a href="a00539.html#a2f6cabfafc11c56ea8335f54fac20343">i2c_receive_one_byte</a></div><div class="ttdeci">uint8_t i2c_receive_one_byte(uint8_t ack)</div><div class="ttdoc">Receive one byte (MSB first).</div><div class="ttdef"><b>Definition:</b> i2c_bitbang_samd21.c:212</div></div>
<div class="ttc" id="a00539_html_a20d903bd4606203e120babaf3fe4d926"><div class="ttname"><a href="a00539.html#a20d903bd4606203e120babaf3fe4d926">i2c_send_wake_token</a></div><div class="ttdeci">void i2c_send_wake_token(void)</div><div class="ttdoc">Send a Wake Token.</div><div class="ttdef"><b>Definition:</b> i2c_bitbang_samd21.c:113</div></div>
<div class="ttc" id="a00539_html_af89a7a4080a47aa10a5504291db285bf"><div class="ttname"><a href="a00539.html#af89a7a4080a47aa10a5504291db285bf">MAX_I2C_BUSES</a></div><div class="ttdeci">#define MAX_I2C_BUSES</div><div class="ttdef"><b>Definition:</b> i2c_bitbang_samd21.h:35</div></div>
<div class="ttc" id="a00539_html_afd6d53ef6b697533839248b40bc97861"><div class="ttname"><a href="a00539.html#afd6d53ef6b697533839248b40bc97861">pin_sda</a></div><div class="ttdeci">uint8_t pin_sda</div><div class="ttdef"><b>Definition:</b> i2c_bitbang_samd21.c:40</div></div>
<div class="ttc" id="a00539_html_a28d871f938b84b40a153a806c55d6aef"><div class="ttname"><a href="a00539.html#a28d871f938b84b40a153a806c55d6aef">i2c_send_stop</a></div><div class="ttdeci">void i2c_send_stop(void)</div><div class="ttdoc">Send a STOP condition.</div><div class="ttdef"><b>Definition:</b> i2c_bitbang_samd21.c:103</div></div>
<div class="ttc" id="a00173_html"><div class="ttname"><a href="a00173.html">atca_status.h</a></div><div class="ttdoc">Microchip Crypto Auth status codes.</div></div>
<div class="ttc" id="a00539_html_a223e077dcbdfaf7944f76664c81c4c3b"><div class="ttname"><a href="a00539.html#a223e077dcbdfaf7944f76664c81c4c3b">i2c_send_ack</a></div><div class="ttdeci">void i2c_send_ack(uint8_t ack)</div><div class="ttdoc">Send an ACK or NACK (after receive).</div><div class="ttdef"><b>Definition:</b> i2c_bitbang_samd21.c:78</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_97aefd0d527b934f1d99a682da8fe6a9.html">lib</a></li><li class="navelem"><a class="el" href="dir_e870e4dac26de7990352b1cb7547818f.html">hal</a></li><li class="navelem"><a class="el" href="a00539.html">i2c_bitbang_samd21.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
